package day7;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Zhishu {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("请输入一个数");
        int count = in.nextInt();
        //int k= (int) Math.sqrt(count);

        for (int i = 2, k = (int) Math.sqrt(count); i <= k; i++) {
            if (count % i == 0) {
                System.out.println(count + "不是质数");
                return;
                //System.out.println("结束了");
            }
        }

        System.out.println("是质数");

    }
}
